const delMd = require('../../modules/delMd')

module.exports = (req, res) => {
  if (!req.body.user_id || !req.body.user_name || !req.body.title) {
    return res.status(200).json({msg: '参数错误', code: 400})
  }

  delMd.del(req.body).then(suc => {
    return res.status(200).json({msg: '删除成功', code: 200})
  }).catch(err => {
    console.log(err)
    return res.status(200).json({msg: '服务器返回错误，请稍后再试', code: 500})
  })
}